﻿
var tpj=jQuery;
tpj.noConflict();

tpj(document).ready(function() {

    if (tpj.fn.cssOriginal!=undefined)
        tpj.fn.css = tpj.fn.cssOriginal;

    tpj('.banner').revolution(
        {
            delay:9000,
            startheight:700,
            startwidth:1700,


            hideThumbs:200,

            thumbWidth:100,							// Thumb With and Height and Amount (only if navigation Tyope set to thumb !)
            thumbHeight:50,
            thumbAmount:5,

            navigationType:"bullet",				// bullet, thumb, none
            navigationArrows:"nexttobullets",				// nexttobullets, solo (old name verticalcentered), none

            navigationStyle:"navbar",				// round,square,navbar,round-old,square-old,navbar-old, or any from the list in the docu (choose between 50+ different item), custom


            navigationHAlign:"center",				// Vertical Align top,center,bottom
            navigationVAlign:"bottom",					// Horizontal Align left,center,right
            navigationHOffset:0,
            navigationVOffset:20,

            soloArrowLeftHalign:"left",
            soloArrowLeftValign:"center",
            soloArrowLeftHOffset:20,
            soloArrowLeftVOffset:0,

            soloArrowRightHalign:"right",
            soloArrowRightValign:"center",
            soloArrowRightHOffset:20,
            soloArrowRightVOffset:0,

            touchenabled:"on",						// Enable Swipe Function : on/off
            onHoverStop:"on",						// Stop Banner Timet at Hover on Slide on/off

            stopAtSlide:-1,							// Stop Timer if Slide "x" has been Reached. If stopAfterLoops set to 0, then it stops already in the first Loop at slide X which defined. -1 means do not stop at any slide. stopAfterLoops has no sinn in this case.
            stopAfterLoops:-1,						// Stop Timer if All slides has been played "x" times. IT will stop at THe slide which is defined via stopAtSlide:x, if set to -1 slide never stop automatic

            hideCaptionAtLimit:0,					// It Defines if a caption should be shown under a Screen Resolution ( Basod on The Width of Browser)
            hideAllCaptionAtLilmit:0,				// Hide all The Captions if Width of Browser is less then this value
            hideSliderAtLimit:0,					// Hide the whole slider, and stop also functions if Width of Browser is less than this value

            shadow:1,								//0 = no Shadow, 1,2,3 = 3 Different Art of Shadows  (No Shadow in Fullwidth Version !)
            fullWidth:"off"							// Turns On or Off the Fullwidth Image Centering in FullWidth Modus


        });



});

jQuery(document).ready(function($) {
    'use strict';
    try {		
        if ($(".animated")[0]) {
            $('.animated').css('opacity', '0');
        }
        $('.triggerAnimation').waypoint(function() {
            var animation = $(this).attr('data-animate');
            $(this).css('opacity', '');
            $(this).addClass("animated " + animation);

        },
            {
                offset: '80%',
                triggerOnce: true
            }
        );
    } catch(err) {

    }
		
    var wow = new WOW(
      {
          boxClass:     'wow',      // animated element css class (default is wow)
          animateClass: 'animated', // animation css class (default is animated)
          offset:       150,          // distance to the element when triggering the animation (default is 0)
          mobile:       false        // trigger animations on mobile devices (true is default)
      }
    );
    wow.init();	

    $(function() {
        // this will get the full URL at the address bar
        var url = window.location.href;

        // passes on every "a" tag
        $(".main-menu a").each(function() {
            // checks if its the same on the address bar
            if (url == (this.href)) {
                $(this).closest("li").addClass("active");
                $(this).parents('li').addClass('parent-active');
            }
        });
    });

    

	
});

function PriceFilter() {
    $.ajax({
        type: "GET",
        url: '/Ajax/Product/Ajax_PriceFilter.aspx.aspx',
        data: { 'minPrice': '', 'maxPrice' : '' , 'catId' : '' , 'pi' : '' },
        complete: function (resonse) {//success
            var value = JSON.parse()
            if (resonse != null) {
                $(".beta-products-list").html(resonse.responseText);
            }
            else {
                alert("Có lỗi xảy ra");
            }
        }
    });
}

